"""
Case Type   : 进程
Case Name   : full参数--查看各字段显示
Create At   : 2024.8.19
Owner       : wang-tianjing1
Description :
    1、full参数，查看显示进程
Expect      :
    1、成功
History     :
"""

import os
import unittest

from testcase.utils.Common import Common
from testcase.utils.CommonSH import CommonSH
from testcase.utils.Constant import Constant
from testcase.utils.Logger import Logger
from yat.test import Node


class OpreatorTest(unittest.TestCase):

    def setUp(self):
        self.log = Logger()
        self.log.info(f'-----{os.path.basename(__file__)} start-----')
        self.common = Common()
        self.sh_primary = CommonSH('PrimaryDbBmode')
        self.user_node = Node('PrimaryDbBmode')
        self.constant = Constant()
        self.db_name = 'd_compatibility_desc_0010'

    def test_dolphin(self):
        text = '----step1:full参数，查看显示进程;expect:失败，合理报错----'
        self.log.info(text)
        sql_cmd1 = f'show full processlist;'
        self.log.info(sql_cmd1)
        sql_res1 = self.sh_primary.execut_db_sql(sql_cmd1)
        self.log.info(sql_res1)
        self.assertNotIn("ERROR", sql_res1,'执行失败' + text)


    def tearDown(self):
        text = '--无需清理环境--'
        self.log.info(text)
        self.log.info(f'-----{os.path.basename(__file__)} end-----')

